import request from "@/utils/request";

// 总数
export const getProjectCount = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-Stat",
    params,
  });
};

// 项目视频个数
export const getProjectVideoCount = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getProjectVideoCount",
    params,
  });
};

//专业简介
export const getProProfile = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-proProfile",
    params,
  });
};

// 项目logo
export const getProjectLogo = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getLogo",
    params,
  });
};

// 项目大图
export const getBigBanner = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getBigBanner",
    params,
  });
};

export const statisticsAllInfoByMajor = (params) => {
  return request({
    method: "get",
    url: "/prod-api/website/projectGroupInfo/projectStatistics/statisticsAllInfoByMajor",
    params,
  });
};
// https://zyk.icve.com.cn/portalProject/ajax-portalproject-Stat?projectId=dxhzalctqitlv9umq3wtdg
// https://zyk.icve.com.cn/prod-api/website/projectGroupInfo/projectStatistics/statisticsAllInfoByMajor?majorId=7ce9d8ab-51fb-4044-9dd1-78dddd3b848e

// 项目首页幻灯片列表
export const getSlides = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getSlides",
    params,
  });
};

// 友情链接
export const getPartnerLink = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getLink",
    params,
  });
};

// 主持（参建）单位
export const getTeam = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getTeam",
    params,
  });
};

/**
 * 学校/企业主持课程数量列表
 * projectId 项目Id
 * type 1为课程、2为微课
 * classify 判断type=1时，1为学历课程、2为培训课程
 */
export const getSchoolEnterprise = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getSchoolEnterprise",
    params,
  });
};

// 新闻类型
export const getNewsType = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getNewsType",
    params,
  });
};

//新闻列表
export const getNewsList = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getNewsList",
    params,
  });
};

//推荐课程的教师列表
export const getTeacherList = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-portalproject-getTeacher",
    params,
  });
};

// 学习人数前10的课程的标签
export const getCourseTag = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-course-getTag",
    params,
  });
};

// 课程/微课列表
export const getCourse = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-course-getCourse",
    params,
  });
};

// 培训中心数据（培训课程）
export const getTrainCenterList = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-course-getTrain",
    params,
  });
};

// 技能训练课程
export const getTrainingCourse = (params) => {
  //技能训练没有数据 换成获取  其他  课程
  // return request({
  //   method: "get",
  //   url: "/portalProject/ajax-course-getTraining",
  //   params,
  // });
  return request({
    method: "get",
    url: "/portalProject/ajax-course-getCourse",
    params,
  });
};

// 通过课程/微课Id返回课程信息
export const getCourseInfoByCourseId = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-course-getCourseInfoByCourseId",
    params,
  });
};

// 媒体类型数据
export const getMediaType = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-getMediaType",
    params,
  });
};

//适用对象数据
export const getApplicableObjects = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-getApplicableObjects",
    params,
  });
};

//应用类型数据
export const getApplication = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-getApplication",
    params,
  });
};

//所属知识点
export const getKnowledge = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-getKnowledge",
    params,
  });
};

//自定义分类
export const getCustomTree = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-customTree",
    params,
  });
};

//浏览量前20的素材标签
export const getViewRankTags = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-getTag",
    params,
  });
};

//知识树数据
export const getKnowledgeTree = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-ztreeAll",
    params,
  });
};

//素材中心列表
export const getMaterialList = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-newmaterial-material",
    params,
  });
};

//题目列表
export const getQuestionList = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-question-getQuestion",
    params,
  });
};
export const getUserInfo = (params) => {
  return request({
    method: "get",
    url: "/portalProject/ajax-user-userInfo",
    params,
  });
};
export const getUserInfoByLogin = (params) => {
  return request({
    method: "get",
    url: "/prod-api/system/user/getInfo",
    params,
  });
};
export const ExamIndex = (params) => {
  return request({
    method: "get",
    url: "/Exam/index",
    params,
  });
};
export const LoginNew = (params) => {
  return request({
    method: "post",
    url: "https://sso.icve.com.cn/data/userLogin",
    params,
  });
};

export const getBannerList = (data) => {
  return request({
    method: "post",
    url: "/api/Article/getlist",
    baseURL: "https://kaoshiguanli.haimijiaoyu.com/",
    data,
    withCredentials: false,
  });
};

//https://zyk.icve.com.cn/prod-api/graph/knowledge/list
//获取知识图谱数据
export const getKnowledgeList = (params) =>{
  return request({
    method: "post",
    url: "/prod-api/graph/knowledge/list",
    data:params,
  });
}



